Method and apparatus for the sonic measurement of sludge and clarity conditions during the treatment of waste water

ABSTRACT

A sludge blanket level is determined in a waste water treatment clarifier using sonic pulse reflections. Additionally, using similar techniques, the clarity of the waste water is determined. A sonic pulse is directed into the waste water. Echos are generated as the pulse encounters the impedance mismatches indicative of changes in the density of the water. The echos are compensated for attenuation as a function of travel time through the water, energy lost due to prior peak reflections, and are processed to remove random signals using correlation techniques. A sludge blanket is selected from the compensated echo signal as a function of the size and location of echo peaks. Additionally, the clarity is determined as a flnction of the area under the echo signal between two points corresponding to predefined levels in the clarifier tank.

FIELD OF THE INVENTION

The invention relates to the detection of phase boundaries betweenlayers of liquid using sonic energy. More particularly, the inventionrelates to a method and apparatus for detecting phase boundaries in awaste water clarifier for defining the level of a sludge blanket and theclarity of the clarifier.

BACKGROUND OF THE INVENTION

A process of removing semi-solid material from water, often referred toas waste water treatment, is used to treat waste water frommanufacturing processes, sewage and the like. To that end, a variety oftechniques have been developed and used in the treatment of waste water.One popular technique incorporates a settling tank (alternately referredto as a clarifier) that separates semi-solid material (popularly knownas sludge) from the water via gravity. Using this technique, the wastewater (influent) enters a clarifier, wherein the sludge is encouraged tosettle to the bottom. As the sludge settles, density gradient layersform in the clarifier, with the densest layers disposed toward thebottom of the clarifier. Relatively clear water then exits from the topof the clarifier, while the sludge is removed from the bottom.

Controlling the level of sludge is a key aspect in the effectiveoperation of the clarifier. On the one hand, if the sludge level is toohigh, contaminated water may exit from the top of the clarifier. On theother hand, if the sludge level is too low, the sludge removed from thebottom of the tank will contain too much water, increasing disposalcosts.

Consistently determining the location of a "sludge blanket"--an industryterm used to refer to a demarcation level in the clarifier--is the keyaspect to controlling the sludge level within the clarifier. Thematerial above the sludge blanket is, in theory, mostly liquid and ismore clear; whereas, the material below the sludge blanket is, intheory, mostly solid and is relatively dense. Although the name impliesthat the sludge blanket location may be readily determined, in practicethe determination is less than precise. The challenge in determining thesludge blanket location arises from the nature of the density gradientsin the clarifier. That is, the material in the tank is thinnest near thetop and densest near the bottom; however, there is no absolutedemarcation point where the clear water ends and the sludge begins.Consequently, the techniques currently employed to measure the sludgeblanket level provide inconsistent results. This inconsistency leads toinefficient treatment of waste water.

Although determining a sludge blanket level is a significant aspect ofwaste water treatment, where and how that level is maintained presentstrade-offs for the waste water treatment plant operator. One of the mostsignificant trade-offs concerns determining at what level to maintainthe sludge blanket. On the one hand, maintaining a high sludge blanketlevel generally increases the density of the sludge in discarded wastewater and results in reduced disposal costs. The disposal costs arereduced because the sludge within the sludge blanket is disposed of whenit accumulates to a predetermined level in the bottom of the tank. Thedisposal cost of the sludge is directly influenced by the percentage ofsolid material in the discarded waste. The denser the sludge, the moreeconomical the disposal and vice-versa. As a result, disposal costs aredecreased because less excess water is transported and disposed with thesludge. As a rule of thumb, sludge blanket densities typically rangefrom 1 to 5 percent solids. If the sludge blanket is too low ornon-existent, the sludge removed from the tank will be about 99 percentwater. If a high sludge blanket level is maintained in the clarifier theunderlying sludge is generally denser. Thus, there is a strong economicincentive to maintain a high sludge blanket.

On the other hand, current systems that increase sludge density bymaintaining a high sludge blanket level have the unfortunate side-effectof increasing the likelihood that contaminated water will exit the tank.That is, as the sludge level rises, the likelihood increases that thewater exiting the clarifier will be less clear. So as a trade-off tomaintaining a high sludge blanket, closer scrutiny of the clarifier isrequired because of the potential for short-circuiting the tank, whereinsuspended solids do not settle but rather exit out of the top of theclarifier. Such short circuits generally result in downstream pollutionand can be the basis for violations of governmental pollutionregulations. Thus, there is a need for a system that allows the sludgelevel to be maintained at a high level, while having an accurate andeconomical monitoring system.

Several methods have been employed at waste water treatment plants tomonitor the sludge blanket level. Among the most widely used--and themost primitive--is a "sludge judge." A sludge judge is a tube that takesa core sample of the clarifier. In operation, the sludge judge is slowlylowered into the water allowing a representative core sample of thewater to enter the tube. When the sludge judge has reached the bottom ofthe tank, the tube is closed and removed from the tank. The translucenttube is then visually inspected and the operator makes a subjectivedetermination of the location of the sludge blanket. The problems withsuch a technique for monitoring the sludge blanket are numerous and,perhaps, obvious. For example, errors are introduced if the tube is notlowered at the proper rate or angle. Additionally, different sludgeblanket determinations will result from taking the core sample atdifferent locations in the tank or from different operators making thedetermination, which leads to a variable and subjective sludge blanketdeterminations.

Other devices use portable sonic or optical sensors to determine thesludge blanket location. U.S. Pat. No. 4,940,902 issued to Mechalas etal. discloses such a device. The device consists of a transmitter and areceiver pair (either sound or light), which is lowered into the tank.As the density of the waste water increases, the operator monitors thelowering of the device and the corresponding density either audibly, viaa meter or via some other indicator. Although, such devices overcomesome of the problems encountered in the use of a sludge judge,additional problems arise. For example, the device must physically enterthe sludge blanket. This could agitate the sludge sediment and lead to afalse reading. Moreover, as with the sludge judge, different operatorsmay obtain different readings through human error.

In U.S. Pat. No. 4,121,094 issued to DiVito et al., a technique isdescribed for using ultrasonic energy to measure the sludge blanketlevel. According to the DiVito patent, a transducer is mounted near thetop of the tank. The transducer is capable of both transmitting andreceiving an ultrasonic signal which is projected toward the sludgeblanket. The signal reflected from the sludge blanket is received by thetransducer and converted to an electrical signal. However, the DiVitotechnique is not sufficiently accurate. For example, the sludge blanketis detected by comparing the electrical signal received from theultrasonic echo to a reference voltage. When the amplitude of the echosignal matches the reference voltage, the DiVito system interprets thisas the sludge blanket having reached the maximum height. Pumps are thenoperated to lower the sludge blanket level. Such a technique may falselydetect transient conditions as a sludge blanket level. For example,sludge disturbed by the skimmer arm could cause the pump to falselyoperate. Moreover, thin layers of sludge could bypass detection and exitthe top of the clarifier.

All of the techniques described above suffer from the inability toaccurately and consistently maintain sludge levels in a clarifier.Applicants have recognized that method and apparatus that could increasethe density of disposal sludge while preventing sludge fromshort-circuiting the tank would greatly enhance the efficiency of wastewater treatment plants. Thus, there is a long-felt need for method andapparatus that accurately and consistently maintain the sludge levelswithin a clarifier.

SUMMARY OF THE INVENTION

The present invention meets the needs above by providing a method andapparatus for use in connection with level measurement in a medium thathas impedance mismatches, such as those found in a clarifier for wastewater treatment. The invention operates on acoustic echoes that aregenerated when acoustic energy transmitted into the medium encountersthe impedance mismatches caused by density changes of the medium.

The method of using sonic energy to measure the impedance mismatchescomprises the steps of receiving the echoes and converting them intoelectrical representations that have magnitudes indicative of amplitudesof the echoes. The magnitudes of the electrical representations are thenadjusted according to a first function that is inversely related toattenuation of acoustic energy occurring during travel of the acousticenergy through the medium. This first function could be accomplished viahardware or software. In a hardware implementation, an amplifier,employing the first function as a gain characteristic of the amplifier,could be used. In such a case, the gain characteristic is such that thegain of the amplifier increases in relation to times that echoes arereceived. After compensating the electrical representations according tothe first function, selected ones of the adjusted magnitudes are furtheradjusted according to a second function that compensates the adjustedmagnitudes under consideration for attenuation of acoustic energy causedby acoustic energy reflected in generating previous echoes. This secondfunction could be accomplished by obtaining an indication of theacoustic energy reflected in generating the previous echoes andincreasing the indication to the adjusted magnitudes underconsideration.

The method above has many applications. For example, the adjustedelectrical representations could be further processed to determine theapproximate level of a selected portion of the medium, e.g., a sludgeblanket in a waste water treatment clarifier. After determining thelevel, sludge blanket or otherwise, an alarm could be set indicating alevel above a predefined value, e.g., a sludge blanket level that is toohigh.

The methods described above could be applied in a waste water treatmentplant that uses a clarifier to filter waste water. As indicated above,such a method would be employed to substantially define the location ofa sludge blanket in the clarifier. As such, a sonic pulse is transmittedtoward the bottom of the clarifier in a path substantially normal to thesurface of the waste water. The resulting echo signal is then receivedand processed to determine the sludge blanket level. According toaspects of the invention, the echo signal received is compensated forsonic pulse attenuation as a function of sonic pulse travel time throughthe waste water and pulse attenuation caused by cumulative reflections.The sludge blanket is then detected according to the size and locationof the peaks.

According to a further aspect of this method, the peaks are compensatedfor cumulative reflections in several steps. First an amplitude,A.sub.(i) for each peak, i, in the echo signal is determined. Second, adistance, L.sub.(i, i+1), between each adjacent pair of peaks, i and i+1is ascertained. Finally, a compensated amplitude, A.sub.(i+1) ', isdetermined by compensating each amplitude A.sub.(i+1) for the energyabsorbed by each prior peak i according to:

    A.sub.(i+1) '=A.sub.(i+1) *{1+K*L.sub.(i, i+) *[A.sub.(i) '/(A.sub.(i) '+A.sub.(i+1))]},

where K is a constant.

Additionally, correlation is employed to filter random echo signals fromthe return signal.

As such, at least two echo signals are multiplied to create a singlecomposite echos signal such that random changes in either echo signalare canceled.

According to another aspect of the invention, the techniques above areemployed to determine the clarity of waste water within the clarifier.That is, a sound pulse is transmitted toward the bottom of the clarifierin a path substantially normal to the surface of the waste water. Theecho signal is received and processed for waste water clarity. Theprocessing comprises compensating the echo signal received for pulseattenuation as a flnction of sound pulse travel time through the wastewater and amplifying the echo signal within a range corresponding to afirst predefined level and a second predefined level. The clarity isthen determined as an integral of the echo signal between the firstpredefined level and the second predefined level. The clarity could beemployed, for example, to set an alarm condition when the integral isgreater than a predefined value for a predefined period of time.

The apparatus for determining a sludge blanket level and clarity in aclarifier tank comprises a transmitter, a receiver, and various signalcompensation means. The transmitter transmits a sonic pulsesubstantially normal to an expected level of the sludge blanket. Thereceiver then receives an echo signal of the sonic pulse, the echosignal being representative of changes in the concentration ofcontaminants within the water. The receiver also converts the echosignal into an electrical signal. Thereafter, first means in electricalcommunication with the receiver compensates the electrical signal forsonic pulse attenuation as a function of time (i.e., distance traveledthrough the water). Such compensation means can be accomplished viahardware or software. For example, an operation amplifier having a timevarying gain could be employed. Second means are also provided tocompensate the electrical signal for energy changes experienced by thesonic pulse as a function of cumulative previous echoes, which echoesare caused by changes in contaminant concentration. The electricalsignal is then processed to determine the sludge blanket level as afunction of the peaks within the electrical signal or clarity of thewaste water. In one such function, the sludge blanket is selected as aweighted average of the magnitude of the peaks and their respectivedistances from the bottom of the clarifier.

In a preferred embodiment, the second means is accomplished viasoftware. Accordingly, an analog-to-digital converter is employed toconvert the electrical signal into a digital representation. Amicroprocessor, coupled to the analog-to-digital converter, executes asoftware program that detects peaks in the converted electrical signaland increases selected peaks by an amount related to the magnitude ofprior peaks.

BRIEF DESCRIPTION OF THE DRAWINGS

The foregoing summary, as well as the following detailed description ofthe preferred embodiment, is better understood when read in conjunctionwith the appended drawings. For the purpose of illustrating theinvention, there is shown in the drawings an embodiment that ispresently preferred, it being understood, however, that the invention isnot limited to the specific methods and instrumentalities disclosed.

In the drawings:

FIG. 1 is a block diagram of a portion of a waste water treatment plantwherein the present invention may be employed;

FIG. 2 is a pictorial representation of a clarifier tank employingaspects of the present invention;

FIG. 3 is a graphical depiction of two exemplary normalized echo signalsreceived in accordance with the present invention;

FIG. 4 is a graphical depiction of the correlation signal resulting fromthe combination of the exemplary echo signals depicted in FIG. 3;

FIG. 5 is a graphical depiction of the correlation signals compensatedfor energy reduction due to prior echoes;

FIG. 6 is a flow chart of the process of determining the sludge blanketlevel in accordance with the present invention;

FIG. 7 is a block diagram of a system for generating the acoustic energypulse and processing the echo signal;

FIG. 7A is a block diagram of the function of the TVG mechanism and thereceiver;

FIG. 8 graphically depicts the effects of pulse beam attenuation and thetime varying gain that is applied to correct for the attenuation;

FIG. 9 illustrates the function of measuring the clarity of theclarifier in accordance with the present invention; and,

FIG. 10 is a flow chart of the process for determining the clarity inaccordance with the present invention.

DETAILED DESCRIPTION OF A PREFERRED EMBODIMENT

According to a presently preferred embodiment a waste water treatmentsystem that incorporates a control system based on sludge densities willnow be described with reference to the FIGURES. It will be appreciatedby those of ordinary skill in the art that the description given hereinwith respect to those FIGURES is for exemplary purposes only and is notintended in any way to limit the scope of the invention. For example,sample sonic pulse frequencies and durations are provided throughout thedescription. However, such examples are merely for the purpose ofclearly describing the present invention and are not intended as limits.

I. SYSTEM OVERVIEW

Referring now to the drawings wherein like numerals indicate likeelements throughout, FIG. 1 depicts a portion of a prior art waste watertreatment system. Typically, raw waste water first enters a primaryclarifier (not shown) wherein floatable matter, solids and the like areremoved. Thereafter, the output of the primary clarifier enters anaeration tank 50. In the aeration tank 50, the organic matter of thewaste water is brought into contact with microorganisms. Oxygen is alsoadded to the aeration tank 50. The organic matter and the oxygen becomeenergy sources for the growth of the microorganisms. The resultingbiological mass, commonly referred to as mixed liquor suspended solids(MLSS), then exits the aeration tank 50 and enters the secondaryclarifier 10. Within the clarifier 10 the suspended solids settle to thebottom forming sludge layers 18. The water that exits the clarifier 10in the effluent stream should be "clear" in the sense that it meetsgovernmentally defined quantities of suspended solids inparts-per-million. In most previous waste water treatment systems, ofwhich FIG. I is typical, the monitoring of the sludge layers is a manualtask and the controlling of the system of FIG. I is performed manuallyby an operator, e.g. by turning on a pump (not shown) connected to valve52 to remove sludge.

A sludge blanket 18 must be maintained at a predefined level to ensureproper operation of the clarifier 10. As such, the pump connected tovalve 52 must be operated to raise or lower the sludge blanket 18 inaccordance with the predefined level. By operation of the pump, aportion of the removed sludge is returned to the aeration tank 50 tomaintain the biological microorganisms and, a portion of the sludge isremoved from the system and discarded. As will be explained more fullybelow, the present invention provides for an efficient operation of thewaste water treatment plant by automatically monitoring the sludgeblanket 18 and maintaining a measure of the clarity of the clarifier 10.This monitoring information can then be used as part of a more automatedwaste water treatment plant.

Referring now to FIG. 2, the clarifier 10 and the system of monitoringthe sludge blanket 18 in accordance with the present invention aredepicted. As shown, the MLSS in the clarifier 10 separates into clearwater, which exits the clarifier 10 in the effluent stream, and sludge17 which exits the clarifier 10 under the control of valve 52. As notedabove, if the sludge level rises too high within the clarifier 10, theeffluent could become contaminated. Therefore, a sludge blanket 18 mustbe defined and maintained at a level that will keep the clarity of theeffluent within governmental regulations. Also depicted in the clarifier10 is a particular form of suspended solids 13, commonly referred to asfluff 13. Fluff 13 comprises particles relatively large in size but lessdense than the sludge. As a result, the fluff 13 does not readily settleto the bottom of the clarifier 10.

Significantly, as the sludge blanket level rises, the fluff 13 alsorises, increasing the potential that the fluff 13 will exit theclarifier 10 and contaminate the effluent.

As will be described more fully below, an operator (not shown) enters adesired sludge blanket set point into controller 22 via an input device23, such as a keypad. The controller 22 then periodically monitors thesludge blanket level 18 via transducer 12 and displays the level 18 viaan output device 24, such as an LCD display. Moreover, the controller 22compares measured sludge blanket level 18 to the operator set point. Ifthe measured sludge blanket level 18 is significantly higher than theset point, the controller 22 takes corrective action, such as operatingthe pump connected to valve 52, or sounding alarm 25 or both.Additionally, the controller 22 periodically monitors the water in thearea above the sludge blanket 18 for suspended solids 13. If suspendedsolids 13 are detected at a predefined height in the clarifier 10, thecontroller 22 takes corrective action or sounds the alarm 25 or both.

II. MONITORING THE SLUDGE BLANKET

The clarifier 10 monitoring process begins when the controller 22signals the transducer 12 to generate an sonic pulse 14 (hereinafteralso referred to as a sonic pulse or sound pulse). That sonic pulse 14then travels through the waste water contents of clarifier 10 in adirection substantially perpendicular to the water level 16. During itstravel through the waste water, the sonic pulse 14 will encounter avariety of impedances, depending upon the varying sludge concentrationsin the waste water. As the sonic pulse 14 experiences changes in thesludge concentration at various points, a corresponding change inimpedance is experienced by the sonic pulse 14. Consequently, a portionof the sonic pulse 14 reflects back in the general direction of thetransducer 12, and a portion of the sonic pulse 14 continues down intothe clarifier 10. The reflected pulse results in echo 15, which isreceived by the transducer 12. The energy in the echo 15 excites thetransducer 12, which in turn, converts the echo 15 into an electricalecho signal. The electrical echo signal is then provided to controller22 for processing. After controller 22 collects a sufficient number ofecho signals, the controller 22 employs further aspects of the presentinvention, which will be described in detail below, to determine thelocation of the sludge blanket 18 within the clarifier 10.

FIG. 6 presents a flow chart of the process employed by controller 22for determining the sludge blanket 18 level. In the initial step 100, asonic pulse 14 is generated, as described above, by exciting atransducer 12, such as a piezoelectric transducer, and directing ittoward the expected location of the sludge blanket 18. In the presentlypreferred embodiment, a 200 kHz square wave is applied to the transducerfor 100μ seconds. As a result, 200 kHz sinusoidal waves issue fromtransducer 12 for about 100μ seconds followed by a 500μ second ringdown.

After the sonic pulse 14 is transmitted, the transducer 12 switches to areceive mode and begins listening for echoes 15 from the clarifier 10,as indicated at step 102. Three major procedures are performed duringthe reception of the echo 15 to ensure an accurate echo interpretation.The first procedure, as indicated by step 105, corrects the echo 15 forthe effects of sonic energy attenuation due to distance traveled. Thatis, after the pulse exits the transducer, it is attenuated due todistance traveled and attenuated as a function of the square of thedistance traveled from the transducer 12. As a result of distancetraveled sonic pulse attenuation, each reflection that returns fromdeeper in the clarifier 10 is based on less available pulse 14 energy.Consequently, the intensity of early reflections is exaggerated relativeto the intensity of later reflections. According to an aspect of thepresent invention, the echoes 15 received are normalized for theattenuation in the sonic pulse 14 due to distance traveled by amplifyingthe echo signal with a time varying gain factor (step 105). Referringalso to FIG. 8, the strength of the sonic pulse 14 over time versus thetime varying gain (TVG) factor that is applied to the echo signal isgraphically illustrated. Time is plotted along the abscissa, while thepulse energy available, curve 46, and the gain applied, curve 48, areplotted along the ordinate. Notably, the TVG factor, represented bycurve 48, is inversely related to the available energy of sonic pulse14, represented by curve 46. By applying the TVG gain to the echo signalin this way, the echo signal is normalized for the clarifier depth. Aswill be described in further detail below, the TVG can be applied via anamplifier in series with the transducer 12 or, alternatively, the TVGcan be applied via software.

In the second procedure, indicated by step 108 in FIG. 6, random signalsare filtered from the echoes 15 received. Random conditions, such asnoise or the movement of a skimmer arm within the clarifier 10, maycreate undesirable signals, which may inadvertently be perceived assludge induced echoes. Therefore, according to an aspect of the presentinvention, the filtering is accomplished via a correlation techniquewherein several echo signals are collected and compared by thecontroller 22 to remove the random signals. As a result of thecorrelation, a composite signal is generated that effectively cancels orminimizes the random signals. Effectively, sludge levels should appearstatic during the relatively short time period between successive pulses14. Thus, an echo 15 from a change in sludge density should generallyappear the same for two successive pulses 14. By contrast, randomconditions will change between the two successive pulses 14 and,consequently, should not appear in successive echo signals. Thus, bymultiplying the two echoes signals, those echoes appearing in bothsignals will remain, while the random conditions are diminished orcanceled. As indicated by step 104, additional echo signals are gatheredto correlate echoes.

FIGS. 3 and 4 graphically illustrates the process of using two echosignals to enhance the sludge blanket 18 determination. In the FIGURES,the depth of the clarifier 10 in feet is indicated along the abscissa,while normalized signal strength is indicated along the ordinate. FIG. 3graphs two exemplary echo signals 40 and 42, which have been normalizedfor the effects of distance traveled. In FIG. 4, a composite echo signal43 is graphed that was created by multiplying the two exemplary signals40 and 42. By comparing the two FIGURES, it can be seen that those areasin which the two echo signals 40 and 42 agree are exaggerated, while theareas in which they disagree are minimized. As a result, the portions ofthe echo signal that are caused by sludge level induced impedancechanges become more pronounced.

After all echo signals have been processed, valid peaks are detected inthe compensated echo signal and the distance from the bottom of theclarifier is determined (step 109). The final procedure, compensates theecho signal for pulse 14 energy reflected by successive impedancechanges, as indicated by step 110. That is, each time an impedancechange is experienced by the sonic pulse 14, an echo 15 is generated.This echo 15 will appear as a local peak in the echo signal amplitude(see e.g., local peaks 43a and 43b of composite echo signal 43).Significantly, after each reflection, a portion of the energy from pulse14 is directed back toward the transducer 12, while a portion of theenergy from the pulse 14 continues down into the clarifier 10. Thereflected energy is then unavailable to provide energy for laterreflections. As a result, less energy will be reflected for subsequentimpedance changes and the amplitude of the peak under consideration willnot accurately reflect the magnitude of the impedance change experiencedby the pulse 14. In other words, two identical impedance changes willgenerate different echo signals if generated by differing amounts ofenergy; the more available energy at the time of the reflection, thegreater the echo strength. If left uncompensated, this phenomenon willskew the sludge blanket determination. Accordingly, before the sludgeblanket can be accurately determined, the composite echo signal (e.g.,signal 43) is compensated for this reflected energy loss.

In the presently preferred embodiment, the composite echo signal eachpeak, A_(i+1), is compensated for reflected energy according to thefollowing equation: ##EQU1## Where: i is counter from 1 to the number ofpeaks detected in the composite echo signal;

A_(i) is the amplitude of ith peak in the composite echo signal;

A_(i) ' is the compensated amplitude for the ith peak

D.sub.(i, i+1) is the distance in feet between the peaks A_(i) andA_(i+1)

K is a constant as, explained below, that is based on the expected andmeasured sludge profile of the clarifier.

In essence, the equation compensates each peak under consideration forenergy reflected in all preceding sludge density induced impedancechanges, as represented by prior peaks. In addition to the peakcompensation, the equation also factors in the thickness of each sludgelayer, as indicated by the distance D.sub.(i, i+1) between the peaks.

The operation of the equation (1) can be better understood by referenceto FIG. 4 wherein exemplary composite echo signal 43 is graphed. Thefirst peak, A₁, remains uncompensated (i.e., the equation starts withi+1) because it is the first peak and as such the pulse 14 will not haveexperienced previous reflections. On the other hand, peak A₂, forexample, should be compensated for the energy reflected by the previoussludge layer. Accordingly, energy reflected by peak A₁ will be added topeak A₂ as compensation. Moreover, the sludge density layer indicated bythe peaks have a certain thickness (i.e. the distance from the start ofone layer to the start of the next layer). This thickness is alsoaccounted for by equation (1), as represented by D.sub.(i, i+1).Significantly, all subsequent peaks are compensated, according to theequation, for the energy reflected by all previous sludge layers. Thus,peak A₃ is compensated for energy reflected by peaks A₂ and A₁ and thedistances D.sub.(3,2) and D.sub.(2,1) ; peak A₄ is compensated forenergy reflected by peaks A₃, A₂ and A₁ and the distances D.sub.(4,3),D.sub.(3,2) and D.sub.(2,1) ; and so on until all peaks have beencompensated.

The constant K is determined based on the clarifier profile.Essentially, there are three value ranges for K corresponding to threegeneral clarifier profile classification: (1) the clarifier has a singledense sludge layer (K=0); (2) the clarifier has multiple sludge layers(K=1-8); and (3) the clarifier has a high number of thin sludge layers(K=9-10). The K value then is indicative of the level of material loss(the higher density and thickness of a layer the greater absorptiontakes place) encountered by the sludge blanket. The effect of a higher Kvalue is to push the sludge blanket determination level further downinto the tank.

Referring also to FIG. 5, the compensated echo signal 45 is graphicallyillustrated, which signal resulted from applying equation (1) to thecomposite echo signal 43. The exemplary compensated signal 45 representsthe culmination of compensations for sonic pulse distance traveled,random signals, and prior peak reflection as applied to the originalecho signals 40 and 42 of FIG. 3.

As indicated at step 112 of FIG. 6, the sludge blanket 18 is thenselected from this compensated echo signal, e.g., 45. Those skilled inthe art will recognize that many variations are possible in selectingthe sludge blanket 18 from the compensated echo signal, as exemplifiedby signal 45. For example, the peak with the greatest amplitude could beselected. However, in the presently preferred embodiment, the sludgeblanket 18 is selected as the weighted average of the peaks ofcompensated echo signal (e.g., 45).

The determination of the sludge blanket level 18 is then determinedaccording to the equation: ##EQU2## Where: i is a number ranging from 1to the number of peaks in the compensated echo signal;

n is the number of peaks in the compensated echo signal;

A'_(i) is the amplitude of the ith peak; and L_(i) is the level in feetfrom the bottom of the clarifier 10 for the ith peak.

As the equation implies, the selection of the sludge blanket 18 willdepend on the density as well as the height in the clarifier of eachsludge layer. Thus, the higher a sludge layer appears in the clarifier,the more weight it will be accorded. Significantly, even thin layers ofsludge that rise up toward the top of the clarifier will cause theselection of a higher sludge blanket value 18. As a result, thelikelihood is reduced that thin layers of sludge will rise up in theclarifier and contaminate the effluent.

After the sludge blanket level is determined, the value is compared tothe sludge level input by the operator, step 114. If the blanket exceedsthe input level for a significant time-period, which is determined byexperimentation and input as a variable into the system, correctiveaction is taken, step 116. This corrective action may include soundingan alarm or operating a pump to lower the sludge blanket level.Otherwise, if the blanket level is acceptable, after a delay period, theprocess begins anew, step 118.

III. MONITORING CLARIFIER CLARITY

In addition to monitoring the sludge blanket level, the clarity of theclarifier must also be closely monitored to ensure the effluent remainswithin regulation. The clarity of the clarifier is a measure of theincreases in suspended solids. As the suspended solids rise higher inthe clarifier, the likelihood increases that some of the suspendedsolids will exit the clarifier and pollute the effluent. Such an eventcould lead to fines for violation of governnental regulations. Thepresent invention, monitors the trend of suspended solids in theclarifier. As the trend increases above a predefined level, correctiveaction is warranted, e.g., an alarm is set or a pump is activated,diverting the effluent.

Referring to FIG. 9, a clarifier 10 similar to the clarifier 10illustrated in FIG. 2 is presented with the emphasis on illustrating theclarity monitoring function of the present invention. As shown, the areaof the clarifier 10 between level L1 and L2 is monitored as a proxy fora clarity value of the tank. The levels L1 and L2 are operatorselectable via input device 23. In general, a sonic pulse 14b, havingthe same characteristics as the pulse 14 used for monitoring the sludgeblanket 18, is transmitted from transducer 12. The echo 15b that returnsfrom the clarifier 10 is converted into an echo signal via transducer12. As will be described more fully below, the echo signal is thenprocessed for a clarity value, which is maintained by the controller 22and monitored for the trend characteristics. If the trend line exceedsthe operator selected threshold, corrective action is taken.

The processing of the echo signal for clarity shares many details withthe sludge blanket 18 determination described in detail above.Essentially, the clarity determination shares all of the steps 100through 110 of FIG. 6 that are employed in connection with the sludgeblanket determination. For example, a sonic pulse is output. A TVG gainis applied. A correlation is employed to filter random signals. And,peaks are detected and compensated for losses due to prior reflections.After the echo signal has been processed, the clarity value isdetermined as an integral of the correlated echo signal between the L1and L2. Therefore, a gain value is applied that exaggerates the echosignal between L1 and L2 so that a more accurate measurement can beobtained.

The process for controlling the clarifier clarity is best understoodwith reference to the flow chart of FIG. 10. Initially, a sonic pulse istransmitted and the echo signal is received, as described above inconnection with the sludge blanket monitoring (repeated in this FIGUREas step 120-125). After the echo signal has been corrected, the clarityof the waste water in the clarifier is determined. The object of theclarity determination is to compare the value of the integral of theecho signal corresponding to the clarifier levels between L1 and L2(step 126) to the value of the integral of the echo signal correspondingto the clarifier levels from L2 to the bottom of the clarifier (step127). In the preset embodiment, in order to speed the calculationprocess, only the peak values are used. The equation is as follows:##EQU3## Where: A is the amplitude of a peaks in the echo signal;

1 is the number of the first peak in the echo signal corresponding tothe region of the tank between L1 and L2;

m is the number of the last peak in the echo signal corresponding to theregion of the tank between L1 and L2; and,

n is the last peak in the echo signal.

Accordingly, the equation generates a clarity value as the sum of theamplitudes of the peaks in the clarity region over the sum of the peaksin the region below the clarity region to the bottom of the clarifier(step 128). By generating the clarity value in this way, it isnormalized for changes in the system dynamics, e.g., transducer powerchanges and the like. If the result of the equation indicates that theclarity trend value is too high (i.e., greater than a predefined limit),corrective action is taken (steps 129-130). Otherwise after a delay (onthe order of 15 minutes to 1 hour) indicated at step 132, the processbegins again.

After the sludge blanket level 18 and the clarifier clarity values aredetermined they are displayed on output device 24. If corrective actionis required, a pump could be automatically operated until the clarity orsludge values return to a more acceptable level or an alarm could beset, indicating to an operator that corrective action is necessary.Obviously, the clarity and the sludge blanket determination shareaspects in common. As such, the processes could be combined into asingle clarifier tank monitoring system. For example, the same set ofecho signals could be used in common and two sets of calculations thenapplied; however, they have been presented herein as separate processesfor brevity and simplicity.

IV. CONTROLLER

The system for practicing the sludge monitoring processes is illustratedin FIG. 7. The system comprises an input device 23 whereby an operator(not shown) inputs variables, such as a sludge blanket set point, and aclarity set point and the like for use and storage by the controller 22.Input device 23 can be any conventional input device such as a keyboard,a mouse, or the like. Results and operator queries are presented onoutput device 24, which may be any conventional output device such as amonitor, an LCD display, or the like.

The controller 22 is comprised of a processor 30, memory 38, an A/Dconverter 32, a transceiver 34, and an amplifier 36. The main processor30 provides the computing power needed by the controller 22 and can beany sufficiently powered CPU. In the presently preferred embodiment, theprocessor 30 is an 80C451 manufactured by Philips. The memory 38provides for the storage of programs, user input variables, datagathered from the transducer and similar information. The memory 38 maybe comprised of RAM, ROM, EEPROM, magnetic storage and the like. The A/Dconverter 32 is preferably an 8 bit A/D converter with an approximately1.4μ second conversion time, such as a AD7820 manufactured by AnalogDevices.

The processor 30 in conjunction with memory 38 executes the clarity andblanket measurements processes described above as a software program.For each clarifier echo signal, the processor 30 sends a start commandto the transmitter portion of transceiver 34. The transmitter 34acomprises a square wave oscillator that oscillates at 200 kHz for 100μseconds. The square wave is applied to the transducer 12 to generate apulse 14. After about 600μ seconds, the transceiver 34 switches to areceive mode, wherein the transducer is coupled to an amplifier in thereceiver 34b to begin converting echoes 15 into electrical signals. Theoutput from the amplifier is connected to the A/D converter 32, whichconverts the echo signal into a digital form for processing by processor30.

A TVG must be applied to the echo signal received in order to compensatethe signal for pulse 14 attenuation due to distance traveled. Thoseskilled in the art will appreciate that the gain factor can be appliedvia software, i.e., after the echo signal has been digitized by the AIDconverter 32, or via hardware. As is described more fully below, In ahardware embodiment, a synchronized square law waveform is generatedwhich is used to set the gain of the amplifier of the receiver 34b. FIG.8 presents the voltage waveform that is applied as the gain to theamplifier in the receiver 34b.

FIG. 7A is a block diagram of the TVG hardware connected to thereceiver. Initially, the main processor 30 sends a trigger to the TVG tostart the process. Thereafter, Flip-Flop 50 changes states, resettingthe timer/counter 57 and sending a signal to Flip-Flop 52. Thetimer/counter 57 then begins providing a clock signal to Flip-Flop 52.Oscillator 56 provides a 50 kHz time base to timer/counter 57. At theend of a predefined period the timer counter sends a reset signal to theFlip-Flops 50, 52 so that they are ready for the next trigger signal.The output of Flip-Flop 52 provides the signal to output control 53 viaring-down suppressor 54. Output control 53 gates the TVG signal to thereceiver 34b. However, ring-down suppressor 54, connected betweenFlip-Flop 52 and output control 53, ensures that no TVG signal is outputuntil the transducer 12 has switched to receive mode. Simultaneously,Flip-Flop 50 provides a control signal to the initialization andintegration control circuitry 58. This circuitry 58 provides a signal tointegrator 51 to generate the TVG signal (as shown in FIG. 8) that isprovided to receiver 34b.

FIG. 7A also shows further details of receiver 34b. The output fromtransducer 12 enters receiver 34b via a connection to pre-amp 60.Pre-amp 60 is tuned to the sonic pulse frequency (e.g., 200 kHz) andadditionally provides a first stage of amplification. This ensures thatonly echo signals returning from the generated sonic pulse are receivedand amplified. The outputs from pre-amp 60 and TVG circuit 36 both feedmultiplier 62 wherein both signals are multiplied together. As a resultof the multiplication, the output from multiplier 62 is corrected forsonic pulse signal attenuation as a function of distance traveled. Themultiplier output signal is then provided to amplifier and detectorcircuitry 64. Circuitry 64 detects the peaks of the echo signal byclamping or rectification of the echo signal. Additionally, circuitry 64removes the carrier frequency of the sonic pulse (e.g., 200 kHz).Finally, the echo signal is low pass filtered (by filler 66) to furtherimprove the signal to noise performance of the circuit. The final outputsignal is shown, for example, as curve 40 or 42 of FIG. 3.

The transducer 12, best shown in FIGS. 7 and 7A, comprises acommercially available device, such as a piezoelectric transducer. Theoperation of which is well-known to those skilled in the art. As such,the operational characteristics are left out of the present descriptionfor clarity and brevity. However, the placement of the transducer 12 is1 to 2 inches below the water line 16 (see FIG. 2 for approximatelocation of the transducer with respect to the water line), ensuringthat the operation of the present system is not affected by theair/water interface, and in a location no less than 1/3 or more than 1/2the radius of the circular clarifier, ensuring more consistentmeasurements.

The system as described above has been installed and tested in the fieldat various waste water and water treatment facilities. The resultsachieved have met the performance characteristics as described herein.However, the present invention may be embodied in other specific formswithout departing from the spirit or essential attributes thereof. Forexample, those skilled in the art will appreciate that the measurementtechniques described herein could be used to measure sludge in thetreatment of potable water. Accordingly, reference should be made to theappended claims, rather than to the foregoing specification, asindicating the scope of the invention.

What we claim is:
 1. A compensation method for use in connection with level measurement in a medium, wherein acoustic echoes are generated when acoustic energy transmitted into the medium encounters impedance mismatches caused by density changes of the medium, the method comprising the steps of:a) receiving the echoes and converting the same to electrical representations having magnitudes indicative of amplitudes of the echoes; b) adjusting the magnitudes of the electrical representations according to a first function that is inversely related to attenuation of acoustic energy occurring during travel of the acoustic energy through the medium; and, c) further adjusting at least selected ones of the adjusted magnitudes obtained in step (b) according to a second function that compensates one of the adjusted magnitudes under consideration for attenuation of acoustic energy caused by acoustic energy reflected in generating previous echoes.
 2. Method according to claim 1 wherein step (b) comprises amplifying the representation via an amplifier, and the first function is a gain characteristic of the amplifier, the gain characteristic being such that the gain of the amplifier increases in relation to times that echoes are received.
 3. Method according to claim 1 wherein step (c) comprises obtaining an indication of the acoustic energy reflected in generating the previous echoes and increasing the indication to the adjusted magnitudes under consideration.
 4. Method according to claim 1 further comprising the step of determining the approximate level of a selected portion of the medium.
 5. In a medium having a gradient density change, a method of defining a substantially planar level within said medium, comprising the steps of:a) transmitting a sonic pulse substantially normal to an expected location of said planar interface; b) receiving an echo signal as a reflection of said sonic pulse comprising a plurality of peaks having magnitudes and locations indicative of density changes in the medium; c) normalizing said echo signal for sonic pulse attenuation as a fiction of travel time through said medium; d) multiplying each echo peak by the integral of each previously received echo peak to compensate each peak for the sonic pulse energy attenuation caused by previous reflections; and, e) selecting the planar level as a function of the magnitudes and locations of the peaks in the echo signals.
 6. Method according to claim 5 wherein step (c) comprises amplifying the echo signal via an amplifier having a gain characteristic such that the gain of the amplifier increases in relation to time from the transmission of the sound pulse.
 7. In a waste water treatment plant using a clarifier to filter waste water, a method of substantially defining the location of a sludge blanket in the clarifier, comprising the steps of:a) transmitting a sonic pulse toward the bottom of the clarifier in a path substantially normal to the surface of the waste water; b) receiving an echo signal of said sonic pulse, wherein peaks of said echo signal define density changes in the waste water; c) compensating the echo signal received for sonic pulse attenuation as a function of sonic pulse travel time through the waste water; d) compensating the echo signal received for sonic pulse attenuation caused by cumulative reflections; and, e) selecting the sludge blanket from the compensated echo signal peaks according to the size and location of the peaks.
 8. Method according to claim 7 wherein step (c) comprises amplifying the echo signal via an amplifier having a gain such that the gain of the amplifier increases in relation to time elapsed from transmission of the sonic pulse.
 9. Method according to claim 7 wherein step (d) comprises obtaining an indication of the attenuation experienced by the sonic pulse as a result of reflection in generating the previous echo signals and increasing the echo signal relative to said indication.
 10. Method according to claim 9, comprising the steps of:i) finding an amplitude, A.sub.(i), for each peak, i, in the echo signal; ii) finding a distance, L.sub.(i, i+1) between each adjacent pair of peaks, i and i+1; iii) deriving an compensated amplitude, A.sub.(i+1) ', by compensating each amplitude A.sub.(i+1) for the energy absorbed by each prior peak i according to:

    A.sub.(i+1) '=A.sub.(i+1) *{1+K*L.sub.(i, i+1) *[A.sub.(i) '/(A.sub.(i) '+A.sub.(i+1))]},

where K is a constant.
 11. In a clarifier tank containing water having a varying concentration of contaminants, a method of determining a point representing a sludge blanket level in the clarifier, comprising the steps of:a) transmitting a sound pulse in a path substantially normal to the planar surface of the water in the clarifier tank, said sonic pulse projecting toward the surface of the sludge blanket; b) receiving an echo signal of said sound pulse comprising a plurality of peaks; c) compensating the echo signal received for attenuation of the sonic pulse as a function of distance traveled in the water; d) finding an amplitude, A.sub.(i), for each peak, i, in the echo signal; e) finding a distance, L.sub.(i, i+1), between each adjacent pair of peaks, i and i+1; f) deriving a compensated amplitude, A.sub.(i+1) ', by compensating each amplitude A.sub.(i+1) for the energy absorbed by each prior peak i according to:

    A.sub.(i+1) '=A.sub.(i+1) *{1+K*L.sub.(i, i+1) *[A.sub.(i) '/(A.sub.(i) '+A.sub.(i+1))]},

where K is a constant; and, g) selecting the sludge blanket level as a function of a weighted average of compensated amplitude and distance from a bottom of the tank.
 12. Method according to claim 11, comprising the further steps of:i) repeating steps (a-c) to obtain at least two echo signals ii) correlating said at least two echo signals to create a single composite echo signal such that random changes in said at least two echo signals are canceled; iii) repeating steps (d-f) for the composite echo signal.
 13. An apparatus for determining the location of density gradients in a medium having a plurality of density gradients, comprising:a transmitter for outputting a sonic pulse having a frequency, f; a receiver tuned to the frequency f of said energy pulse for inputting an echo of said energy pulse, said echo representing changes in the density of the medium, wherein said receiver outputs an electrical signal as a function of said echo of said sonic pulse; an amplifier coupled to said receiver for amplifying said electrical signal to compensate for energy pulse attenuation as a function of travel time through said medium; and, means coupled to the amplified electrical signal for compensating the electrical signal for cumulative sonic energy attenuation caused by reflection in all previous density changes in the media.
 14. Apparatus according to claim 13 wherein said means for compensating the electrical signal, comprises:an analog-to-digital converter for converting said electrical signal to a digital representation; and, a microprocessor coupled to said analog-to-digital converter, said microprocessor operating a software program that detects peaks in the converted electrical signal and increases selected peaks by an amount related to the magnitude of prior peaks.
 15. Apparatus according to claim 13 wherein the amplifier comprises an operation amplifier having a time varying gain.
 16. Apparatus according to claim 13 wherein the amplifier comprises:an analog-to-digital converter for converting said electrical signal to a digital representation; and, a microprocessor coupled to said analog-to-digital converter, said microprocessor operating a software program that increases said digital representation by a time varying gain.
 17. An apparatus for use in measuring suspended solids in a waste water treatment plant, comprising:a transmitter for transmitting a sonic pulse substantially normal to an expected level of the sludge blanket; a receiver for receiving an echo signal of said sonic pulse, said echo signal representing a change in a concentration of contaminants within the water, and converting said echo signal into an electrical signal; means for compensating said electrical signal for sonic pulse attenuation as a function of distance traveled; means for compensating said electrical signal for energy changes experienced by the sonic pulse as a function of cumulative previous echos caused by changes in contaminant concentration; and, means for determining the sludge blanket level as function of the magnitude and location of peaks within said electrical signal.
 18. An echo compensation method for use in connection with level measurement in a container containing a medium, wherein echoes are generated when a burst of acoustic energy transmitted into the container encounters impedance mismatches in the medium caused by density changes of the medium, the method comprising the steps of:a) receiving the echoes from said burst of acoustic energy and converting the same to electrical representations; and b) adjusting at least selected ones of the electrical representatives of said echoes obtained in step (a) for acoustic energy reflected in previous echoes.
 19. The method as recited in claim 18 further comprising the step of adjusting the electrical representations for travel of the acoustic energy through the medium.
 20. The method as recited in claim 19 wherein step of adjusting for travel of the acoustic energy through the medium comprises amplifying the representation via an amplifier.
 21. The method as recited in claim 20 wherein the adjustment is related to a gain characteristic of the amplifier, the gain characteristic being such that the gain of the amplifier increases in relation to times that echoes are received.
 22. The method as recited in claim 18 wherein the step (b) comprises the steps of:(i) determining from a corresponding electrical representation a peak for substantially each echo received, wherein the peaks comprise a substantially maximum energy level for each echo; and (ii) compensating the selected ones of the electrical representations for energy reflected in previous echoes as a function of echo peaks as determined in step (i).
 23. The method as recited in claim 22 further comprising the step of selecting a level in said medium from one of the selected ones of the compensated electrical representations according to the size and location of its peak.
 24. The method as recited in claim 18 wherein the medium comprises water.
 25. The method as recited in claim 18 wherein the container comprises a waste water treatment tank and the medium comprises water. 